using UnityEngine;
using System.Collections;

public class DiamondMove : MonoBehaviour 
{
	
	public int moveSpeed = 140;
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		Vector3 newPosition = new Vector3(0,-1,0) * (moveSpeed * Time.deltaTime);
		newPosition = transform.position + newPosition;
		transform.position = newPosition;
	
		
		if(newPosition.y < -88) 
		{
			Destroy(transform.gameObject);
			Application.LoadLevel("HighScore");
		}
		
	}
	void OnTriggerEnter(Collider other) 
	{
		audio.Play();
        Destroy(transform.gameObject);
	}
}

	